package com.sushe.service;

import com.sushe.dao.DormBuildingDao;
import com.sushe.service.jiekou.DormBuildingService;

import java.util.Scanner;

public class DormBuildingServiceImpl implements DormBuildingService {

    private DormBuildingDao dormBuildingDao=new DormBuildingDao();

    @Override
    public  void addDormBuilding(){
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入新宿舍楼名称：");
        String name=sc.nextLine();
        System.out.println("请输入新宿舍楼地址信息：");
        String address=sc.nextLine();
        try{
            dormBuildingDao.addDormBuilding(name,address);
            System.out.println("添加成功！");
        }catch(Exception e){
            System.out.println("添加失败："+e.getMessage());
        }
    }
}
